<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>邀请人折扣</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<link href="/assets/umpadmin/style.css" rel="stylesheet">
<script src="http://g.tbcdn.cn/fi/bui/jquery-1.8.1.min.js"></script>
<script src="http://g.alicdn.com/bui/seajs/2.3.0/sea.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.21/config.js"></script>
<script src="/assets/umpadmin/steps.js"></script>
</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">
<input type="hidden" class="logintime" value="{$logintime|default:0}" />
 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">朋友圈的二维码优惠</h3>
		<!-- <a class="button pull-right" style="margin-left:10px" href="/?m=Kxdr&c=Index&a=show_tools"><i class="icon-home"></i>{ldelim}$L.SYS_RETURN}</a> -->
			
		<div class="button-group pull-right">
		  {include file='../global_menu.html'}
		</div>
		</div>
	  </div>
	  <hr />
	  <div class="row">
		<div class="flow-steps" style="margin:0 auto;width:948px">
		  <ol class="num3">
			<li class="first current">1.设置活动名称</li>
			<li class="">2.选择活动商品</li>
			<li class="last">3.完成</li>
		  </ol>
		</div>
		<div class="row span24">
			<form id="J_Form" class="form-horizontal" action="/?m=umpadmin&c=event&a=step2" method="post">
			<input type="hidden" name="ac" value="save" />
			<input type="hidden" class="activity_ids" value="{$activity_ids|default:0}" />
			<div class="row offset3">
			  <div class="control-group span19">
			  <a class="button pull-right" href="/?m=umpadmin&c=event&a=step1">单独创建</a>
				<label class="control-label" style="color:red">批量创建：</label>
				<div class="controls">
				  <input value="{$pro_set.name|default:""}" name="active_name" type="text" data-rules="{ldelim}required:true,maxlength:3{rdelim}" data-remote="/?m=umpadmin&c=eventcfg&a=check_name" data-messages="{ldelim}required:'活动名称不能为空'{rdelim}" class="input-normal control-text" data-tip="{ldelim}text:'请输入活动名称'{rdelim}">
				  <span class="auxiliary-text">（少于3个汉字，因需要自动加后缀）</span>
				</div>
			  </div>
			</div>
			<div class="row offset3">
			  <div class="control-group span20">
				<label class="control-label">起始日期：</label>
				<div class="controls bui-form-group" data-rules="{ldelim}dateRange : true{rdelim}">
				  <input  value="{$pro_set.start_time|default:""}" name="start_time" data-tip="{ldelim}text : '起始日期'{rdelim}" data-rules="{ldelim}required:true{rdelim}" data-messages="{ldelim}required:'起始日期不能为空'{rdelim}" class="input-normal calendar calendar-time" type="text"><label>&nbsp;-&nbsp;</label>
				  <input  value="{$pro_set.end_time|default:""}" name="end_time" data-tip="{ldelim}text : '结束日期'{rdelim}" data-rules="{ldelim}required:true{rdelim}" data-messages="{ldelim}required:'结束日期不能为空'{rdelim}" class="input-normal calendar calendar-time"  type="text">
				</div>
			  </div>
			</div>				
			<div class="row offset3">
			  <div class="control-group span20">
				<label class="control-label" style="color:orange">每邀请几个朋友：</label>
				<div class="controls">
				  <input value="{$pro_set.friend_num|default:""}" name="friend_num" type="text" data-rules="{ldelim}number:true{rdelim}" data-messages="{ldelim}required:'邀请人数不能为空'{rdelim}" class="input-small control-text" data-tip="{ldelim}text:'邀请人数'{rdelim}">
				  <span class="auxiliary-text">（邀请几个朋友可获得次折扣。注意，只有被邀请的朋友成功领取折扣才会计数）</span>
				</div>
			  </div>
			</div>
			<div class="row offset3">
			  <div class="control-group span19">
				<label class="control-label" style="color:orange">减钱：</label>
				<div class="controls">
				  <input  value="{$pro_set.decrease_amount|default:"0"}" name="decrease_money" type="text" data-rules="{ldelim}required:true{rdelim}" data-messages="{ldelim}required:'请输入减钱金额'{rdelim}" class=" input-small control-text" data-tip="{ldelim}text:'减钱金额'{rdelim}"> 元
				  <span class="auxiliary-text">（请输入阿拉伯数字，支持小数点后2位）</span>
				</div>
			  </div>
			</div>
			<div class="row offset3">
			  <div class="control-group span19">
				<label class="control-label" style="color:orange">几个活动：</label>
				<div class="controls">
				  <input  value="{$pro_set.decrease_amount|default:"0"}" name="number" type="text" data-rules="{ldelim}required:true,max:99,min:2{rdelim}" data-messages="{ldelim}required:'请输入批量数额'{rdelim}" class=" input-small control-text" data-tip="{ldelim}text:'几个活动'{rdelim}"> 个
				  <span class="auxiliary-text">（可以减钱的总数=减钱金额x活动数量，更多不生效，最多99）</span>
				</div>
			  </div>
			</div>
			<hr />
			<div class="offset3 clearfix">
			  <div class="span15">
				<label class="control-label">前置条件：</label>
				<div class="offset3 clearfix">
				<button type="button" class="button button-mini js-advance" id="btnShow" data-advance="no">添加条件</button>
				<span class="auxiliary-text">（同一条件只能添加1次，满足条件的用户方可领取。）</span>
				<ul class="adv-set">
				{if $pro_set.vip_user}
				<li class="vip-user-set">
				<input type="hidden" name="vip_user" value="{$pro_set.vip_user|default:0}"/>
				3个月内成交{$pro_set.vip_user|default:0}笔订单
				<a href="#" data-tp="vip-user" class="x-icon x-icon-hover x-icon-mini js-remove">×</a>
				</li>
				{/if}
				{if $pro_set.sum_pay}
				<li class="sum-pay-set">
				<input type="hidden" name="sum_pay" value="{$pro_set.sum_pay|default:0}"/>
				3个月内累计消费{$pro_set.sum_pay|default:0}笔订单
				<a href="#" data-tp="sum-pay" class="x-icon x-icon-hover x-icon-mini js-remove">×</a>
				</li>
				{/if}
				{if $pro_set.pay_time_start || $pro_set.pay_time_end}
				<li class="time-set-set">
				<input type="hidden" name="pay_time_start" value="{$pro_set.pay_time_start|default:""}"/>
				<input type="hidden" name="pay_time_end" value="{$pro_set.pay_time_end|default:""}"/>
				从{$pro_set.pay_time_start|default:""}到{$pro_set.pay_time_end|default:""}之间有订单
				<a href="#" data-tp="time-set" class="x-icon x-icon-hover x-icon-mini js-remove">×</a>
				</li>
				{/if}
				{if $pro_set.item_iids}
				<li class="item-set-set">
				<input type="hidden" name="item_iids" value="{$pro_set.item_iids|default:""}"/>
				订单中包含{$pro_set.item_num|default:0}商品
				<a href="#" data-tp="item-set" class="x-icon x-icon-hover x-icon-mini js-remove">×</a>
				</li>
				{/if}
				{if $pro_set.once_pay}
				<li class="once-pay-set">
				<input type="hidden" name="once_pay" value="{$pro_set.once_pay|default:0}"/>单笔订单达到{$pro_set.once_pay|default:0}元
				<a href="#" data-tp="once-pay" class="x-icon x-icon-hover x-icon-mini js-remove">×</a></li>
				{/if}
				</ul>
				<input type="hidden" class="advance" value="no">
				</div>
			  </div>
			</div>
			<!-- <div class="row offset3">
			  <div class="control-group span15">
				<label class="control-label">备注：</label>
				<div class="controls control-row4">
				  <textarea name="memo" class="input-large" type="text"></textarea>
				</div>
			  </div>
			</div> -->
			<div class="row form-actions actions-bar">
				<div class="centered ">
				  <button type="submit" class="button button-primary js-msg">下一步（设置参与商品）</button>
				  <a href="/?m=umpadmin" class="button  pull-right"><i class="icon icon-home "></i>返回</a>
				</div>
			</div>
		</form>
		</div>
      </div>
    </div>
  </div>
  </div>
</div>
	 <div class="hide" id="rules">
			  <div class="row offset1 " >
				 <div class="control-group button-group ">
					<button type="button" class="button button-mini js-advance" data-advance="vip-user">老用户</button>
					<button type="button" class="button button-mini js-advance" data-advance="sum-pay">累计消费</button>
					<button type="button" class="button button-mini js-advance" data-advance="time-set">指定时段付款</button>
					<button type="button" class="button button-mini js-advance" data-advance="item-set">指定商品</button>
					<button type="button" class="button button-mini js-advance" data-advance="once-pay">单笔金额满</button>
				  </div>
			  </div>
			  <div style="height:20px"></div>
			    <div class="row offset2 centered hide vip-user rule">
				  <div class="control-group span6">
					<div class="controls ">
					  3个月内成交笔数：<input  type="text"  class="input-normal control-text vip-user-val" > 笔
					</div>
				  </div>
				</div>
			    <div class="row offset2 centered hide sum-pay rule" >
				  <div class="control-group span6">
					<div class="controls ">
					  3个月内累计消费金额：<input name="id"  type="text"  class="input-normal control-text sum-pay-val" > 元
					</div>
				  </div>
				</div>
			    <div class="row  centered hide time-set rule">
				  <div class="control-group span11">
					<div class="controls ">
					  指定订单起始时间：<br />
						<input name="start"   class="input-small calendar calendar-time time-set-start-val" type="text"><label>&nbsp;-&nbsp;</label>
						<input name="end"  class="input-small calendar calendar-time time-set-end-val" type="text">
					</div>
				  </div>
				</div>
			    <div class="row offset2 centered hide item-set rule">
				  <div class="control-group span6">
					<div class="controls ">
					  指定订单包含商品：
					  <button class="button button-small js-load-items">读取商品</button>
					  <input name="id"  type="hidden" class="input-normal control-text item-set-val" > 
					  <div class="item-num" ></div>
					</div>
				  </div>
				</div>
			    <div class="row offset2 centered hide once-pay rule">
				  <div class="control-group span6">
					<div class="controls ">
					  单笔订单金额达到：<input name="id"  type="text" class="input-normal control-text once-pay-val" > 元
					</div>
				  </div>
				</div>
			</div> 
</body>
</html>